package com.movitech.mobile.cz.base.sys.service;

import com.movitech.mobile.cz.base.modules.controller.RestReturnResult;
import com.movitech.mobile.cz.base.modules.vo.PageRequestVO;
import com.movitech.mobile.cz.base.sys.entity.SMessages;
import com.baomidou.mybatisplus.service.IService;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSMessageTemplate;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSMessages;
import com.movitech.mobile.cz.base.sys.entity.ext.SMessagesReqVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 消息通知 服务类
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-03-01
 */
public interface SMessagesService extends IService<SMessages> {

	/**
	 * 消息新增
	 * @param sMessages
	 * @return
	 */
	public boolean addSMessages(SMessages sMessages);

	/**
	 * 采购管理后台首页公告通知获取(除外网通知)
	 * @param map
	 * @return
	 */
	public List<ExtSMessages> getNoticeListByShowNum(Map<String, Object> map);

	/**
	 * 管理中心消息列表
	 * @param sMessagesReqVO
	 * @return
	 */
	public RestReturnResult<Object> allMessageList(HttpServletRequest request, HttpServletResponse response, SMessagesReqVO sMessagesReqVO);


	/**
	 * 消息已读
	 * @param request
	 * @param response
	 * @param messageId
	 * @return
	 */
	public RestReturnResult<Object> readSMessage(HttpServletRequest request, HttpServletResponse response, String messageId);

	/**
	 * 消息数量查询
	 * @param userId
	 * @param msgTypeList
	 * @param includeFlag
	 * @return
	 */
	public int getMessageCounts(String userId, List<Integer> msgTypeList, boolean includeFlag);

	public long getMessageListByParamsCounts(Map<String, Object> map);

	public List<ExtSMessages> getMessageListByParams(Map<String, Object> map);

	public long getNoticeListCount(Map<String, Object> map);

}
